amd xsave: Move xsave initialization code to a common place
authorKeir Fraser <keir@xen.org>
Tue, 7 Dec 2010 18:26:38 +0000 (18:26 +0000)
committerKeir Fraser <keir@xen.org>
Tue, 7 Dec 2010 18:26:38 +0000 (18:26 +0000)
commit658fe194c5dadb7f572d603d35a10fb5bd639d3f
tree2a733f95b63bcce4cefd7fc27deb6f344b04e545
parent21c4d089ba2a236dcf33a06222070bd6c60c6e3d
amd xsave: Move xsave initialization code to a common place

This patch moves xsave/xrstor code to CPU common file. First of all,
it prepares xsave/xrstor support for AMD CPUs. Secondly, Xen would
crash on __context_switch() without this patch on xsave-capable AMD
CPUs. The crash was due to cpu_has_xsave reports true in domain.c
while xsave space wasn't initialized.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/intel.c